-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unused front-matter from provider documentation #6238
Remove unused front-matter from provider documentation #6238
Conversation
The sidebar in the Registry is defined just by frontmatter now
Hello! I am a robot who works on Magic Modules PRs. I've detected that you're a community contributor. @shuyama1, a repository maintainer, has been assigned to assist you and help review your changes. ❓ First time contributing? Click here for more detailsYour assigned reviewer will help review your code by:
You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails. If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox. |
Looks like the build failed. Are you able to build this locally? |
Hi @shuyama1 - yes I can build this locally using |
☝️ Latest commit is an extra file @megan07 identified - going to see if deleting that resolves the build issues |
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccFirebaserulesRelease_BasicRelease|TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
Hi @shuyama1! I am Miguel and I work at the Registry team. @SarahFrench asked me to have a look and I can confirm that removing the |
Thanks @miguelhrocha ! @shuyama1 - Thanks for bearing with me on this PR! The remaining thing I don't know is whether this template file need to be removed by a PR directly to the hashicorp/terraform-provider-google repo. It also isn't needed but I can't track its origin from this repo. Also, there is code from this PR that can be removed as a result of this PR. Should removing this unused code be kept as a separate PR, or should everything related to removing deprecated front matter be in this PR? |
I don't think we need a PR against hashicorp/terraform-provider-google repo to remove the template file. It should be automatically removed, as it can be seen in the generated downstream diff result in this PR at #6238 (comment)
Sorry, got a question about this. Looks like the code added in #5890 is introduced to solve hashicorp/terraform-provider-google#10937 where the documentation of some resources are not generated in the correct position in the sidebar. So after merging this PR (removing all unused front-matter and related files), is the appearance of the website sidebar going to remain the same? My understanding is that nothing is going to change on the website and I just want to make sure I understand correctly. Thanks :) |
Ah yes of course I should have checked the downstream diffs! I overlooked that and was only checking what happened locally on my laptop. Thanks! 😁 As for the expected outcomes of this PR, yes, it should leave the documentation and the sidebar navigation in the Registry unchanged. The stuff I'm removing was used at one point but was deprecated around the time when Terraform provider documentation was migrated from terraform.io to registry.terraform.io (long before my time at HashiCorp). Here's some explanation about how the frontmatter is used, if it helps give context about my next paragraphDocs in the Guides subcategoryDocumentation in the Guides subcategory is sourced from the Docs in custom subcategories about resources & data sourcesDocs about resources and data sources are all stored in a flat structure in E.g. the google_privateca_certificate_template resource has "Certificate Authority Service " as the I think my PR will hopefully avoid similar confusion with #5890 , here's the timeline of events showing why it wan't clear at the time that #5890 didn't affect the documentation sidebar as expected:
|
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
@SarahFrench Thank you so much for the detailed explanation! It's super clear now. Then I think this PR is good to go. Thanks for making the changes! |
Thanks @miguelhrocha for taking a look! |
Description
This PR:
layout
front-matter from documentation markdown files and template fileslayout
value refers tosidebar_current
front-matter and template files linked to the sidebar navigation in the documentation.The accepted front-matter values in the Registry documentation are
page_title
andsubcategory
. Thedescription
field is less clear - I've been told that it should be being used to set meta tags for SEO even though the documentation doesn't mention this, so best to leave them alone!Other fields like
layout
andsidebar_current
are not supported anymore - e.g. here's an issue in the aws provider that describessidebar_current
needing to be removed. By removing them it'll make it easier to debug documentation issues etcImpact
Lots of markdown files have the 2 fields deleted from them in this PR
Templates and non-markdown files affected:
This PR should not affect the appearance of documentation in the Registry providing that:
subcategory
still setpage_title
still setOpen questions & stuff
During this work I found this PR updating generation ofAddressed!sidebar_current
in tpgtools - I believe that this could be removed, unless I've misunderstood something!Also I'm aware this change cannot be tested other than by making a release - sorry about that 😬
Depending on how modular-magician works, I think this layout file in the downstream repo might need to be deleted via a PR directly against the downstream?:website/google.erbReferences
sidebar_current
is removed.Checklist
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)